{extend name="index/base" /}
{block name="style"}{/block}
{block name="body"}
<form class="layui-form"> 
	<div class="layui-form-item">
	    <label class="layui-form-label">文章标题：</label>
	    <div class="layui-input-block">
	      <input type="text" name="title" value="{$info.title}" placeholder="" autocomplete="off" class="layui-input" lay-verify="required">
	    </div>
	</div>
  <div class="layui-form-item">
    <label class="layui-form-label">所属分类：</label>
    <div class="layui-input-inline">
      <select name="cate_id" lay-verify="required">
		{volist name="cate_list" id="vo"}
		<option value="{$vo.id}">{$vo.name}</option>
		{volist name="vo.childlist" id="v2"}
		<option value="{$v2.id}" >&nbsp;&nbsp;└{$v2.name}</option>
		{/volist}
		{/volist}
      </select>
    </div>
  </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">文本域</label>
    <div class="layui-input-block">
      	<!-- 加载编辑器的容器 -->
		<script id="container" name="content" type="text/plain" style="height: 500px;width: 500px;">{$info.content|raw}</script>
    </div>
  </div>
  
  <div class="layui-form-item layui-sumbtn">
	  <div class="layui-input-block">
	    <button class="layui-btn window_submit" lay-submit="" lay-filter="ajax-post" type="submit" target-form="layui-form">立即提交</button>
	    <button type="reset" class="layui-btn layui-btn-primary">重置{}</button>
	  </div>
  </div>
  
</form>
{/block}

{block name="script"}

<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container');
</script>
<script type="text/javascript">
layui.use(['tool'],function(){
	var $ = layui.$,layer = layui.layer, form = layui.form,table = layui.table,tool = layui.tool;
	{if condition="isset($info)"}
	tool.setValue('cate_id','{$info->getData('cate_id')}')
	{/if}
});
</script>
{/block}